package com.itheima.zhuangbi;

import java.lang.reflect.Method;

/*
.未知类的内容 可以调用类的属性和方法
 */
public class Demo03 {

    public static void main(String[] args) throws Exception {


        //Singer singer = new Singer();
        Class<?> clazz = Class.forName("com.itheima.domain.Singer");
        Method sing = clazz.getDeclaredMethod("sing");
        sing.invoke(clazz.newInstance());
    }
}
